<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <title>-->请选择你的课程<--</title>
<!--    <link rel="stylesheet" th:href="@{/styles.css}" />-->
</head>

<body>
<form method="POST" th:object="${selection}">

    <h1>请选择你的课程！</h1>
    <span class="validationError"
          th:if="${#fields.hasErrors('ingredients')}"
          th:errors="*{ingredients}">Ingredient Error</span>

    <div class="ingredient-group" id="subject">
        <h3>选择课程：</h3>
        <div th:each="ingredient : ${subject}">
            <input name="ingredients" type="checkbox" th:value="${ingredient.id}" />
            <span th:text="${ingredient.name}">INGREDIENT</span><br/>
        </div>

        <button>提交选课</button>
    </div>

</form>
